﻿using System;
using System.ComponentModel.DataAnnotations;

namespace OurWedding1.Models
{
    [MetadataType(typeof(InstallmentBuddy))]
    public partial class  Installment
    {
    }

    public class InstallmentBuddy
    {
        [Required(ErrorMessageResourceType = typeof (Resources), ErrorMessageResourceName = "Installment_Name_Required")]
        [Display(ResourceType = typeof (Resources), Name = "Installment_Name")]
        public string Name { get; set; }

        [Required(ErrorMessageResourceType = typeof (Resources), ErrorMessageResourceName = "Installment_Amount_Required")]
        [Display(ResourceType = typeof (Resources), Name = "Installment_Amount")]
        [DataType(DataType.Currency)]
        public decimal Amount { get; set; }

        [Required(ErrorMessageResourceType = typeof (Resources), ErrorMessageResourceName = "Installment_Deadline_Required")]
        [Display(ResourceType = typeof (Resources), Name = "Installment_Deadline")]
        [DataType(DataType.Date)]
        public DateTime? Deadline { get; set; }

        [Required(ErrorMessageResourceType = typeof (Resources), ErrorMessageResourceName = "Installment_GuestId_Required")]
        [Display(ResourceType = typeof (Resources), Name = "Installment_GuestId")]
        public int? GuestId { get; set; }

        [Required(ErrorMessageResourceType = typeof (Resources), ErrorMessageResourceName = "Installment_ExpenseId_Required")]
        [Display(ResourceType = typeof (Resources), Name = "Installment_ExpenseId")]
        public int ExpenseId { get; set; }

        [Required(ErrorMessageResourceType = typeof (Resources), ErrorMessageResourceName = "Installment_isDone_Required")]
        [Display(ResourceType = typeof (Resources), Name = "Installment_isDone")]
// ReSharper disable InconsistentNaming
        public bool isDone { get; set; }
// ReSharper restore InconsistentNaming

        [Display(ResourceType = typeof (Resources), Name = "Installment_ExpenseId")]
        public virtual Expense Expens { get; set; }

        [Display(ResourceType = typeof (Resources), Name = "Installment_GuestId")]
        public virtual Guest Guest { get; set; }
    }
}